package org.itboys.trade.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.itboys.trade.constant.OrderConstant;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * 订单明细表
 * @author weisky
 *
 */
@Entity(value = "OrderItem", noClassnameStored = true)
public class OrderItem extends BaseLongIdEntity{

	private static final long serialVersionUID = -1142117347819557509L;
	
	@Indexed
	private Long orderId;//订单ID
	@Indexed
	private Long memberId;
	private Long productId;//商品ID
	private String productName;//商品名称
	private String productImg;//商品小图
	private int num;//购买的数量
	private int scale;//佣金
	private int price;//原价
	private int nowPrice;//现价 也就是成交时的价格  如果是活动价  也用这个字段
	private int totalFee;//最终成交时的金额(num * nowPrice)
	private String elements;//商品规格
	private Integer status = OrderConstant.WAIT_PAY;//订单行状态 可能某个订单行交易的商品单独退款 退货之类的 待定业务
	private String location;
	public Long getOrderId() {
		return orderId;
	}
	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}
	public Long getMemberId() {
		return memberId;
	}
	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}
	public Long getProductId() {
		return productId;
	}
	public void setProductId(Long productId) {
		this.productId = productId;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getProductImg() {
		return productImg;
	}
	public void setProductImg(String productImg) {
		this.productImg = productImg;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	public int getNowPrice() {
		return nowPrice;
	}
	public void setNowPrice(int nowPrice) {
		this.nowPrice = nowPrice;
	}
	public int getTotalFee() {
		return totalFee;
	}
	public void setTotalFee(int totalFee) {
		this.totalFee = totalFee;
	}
	public String getElements() {
		return elements;
	}
	public void setElements(String elements) {
		this.elements = elements;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public int getScale() {
		return scale;
	}
	public void setScale(int scale) {
		this.scale = scale;
	}
}
